#include"Menu_Item.h"

int Menu_Item::item_id() const {
  return menu_item_id;
}

int Menu_Item::category() const {
  return cat_id;
}

int Menu_Item::recipe() const {
  return recipe_id;
}

string Menu_Item::item_name() const {
  return menu_item_name;
}

double Menu_Item::item_price() const {
  return price;
}

Description Menu_Item::descrip() const {
  return descr;
}

bool Menu_Item::DeleteMenuItem(vector<Menu_Item> &menu_itemsVector,int category_id, int menu_id)
{
	for(vector<Menu_Item>::iterator it = menu_itemsVector.begin(); it != menu_itemsVector.end();it++) //search for the max value
	{
		//if found, delete the record
		if(((*it).category() == category_id) && ((*it).item_id() == menu_id))
		{
			menu_itemsVector.erase(it);
			return true;
		}
	}
	return false;	
}